using System;

namespace Microsoft.Coding4Fun.TweetCraft.Tray.Support
{
	/// <summary>
	/// Holds information about application update checking.
	/// </summary>
	public sealed class CheckUpdateResult
	{
		/// <summary>
		/// Initializes a new instance of the <see cref="CheckUpdateResult"/> class.
		/// </summary>
		public CheckUpdateResult()
		{
			UpdateAvailable = false;
			Success = true;
		}

		/// <summary>
		/// Gets or sets the local version.
		/// </summary>
		/// <value>The local version.</value>
		public Version LocalVersion { get; set; }

		/// <summary>
		/// Gets or sets the server version.
		/// </summary>
		/// <value>The server version.</value>
		public Version ServerVersion { get; set; }

		/// <summary>
		/// Gets or sets a value indicating whether this <see cref="CheckUpdateResult"/> is updateavailable.
		/// </summary>
		/// <value><c>true</c> if updateavailable; otherwise, <c>false</c>.</value>
		public bool UpdateAvailable { get; set; }

		/// <summary>
		/// Gets or sets a value indicating whether this <see cref="CheckUpdateResult"/> is success.
		/// Default value is <c>true</c>.
		/// </summary>
		/// <value><c>true</c> if success; otherwise, <c>false</c>.</value>
		public bool Success { get; set; }

		/// <summary>
		/// Gets or sets the message.
		/// </summary>
		/// <value>The message.</value>
		public string Message { get; set; }

		/// <summary>
		/// Returns a <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
		/// </summary>
		/// <returns>
		/// A <see cref="T:System.String"/> that represents the current <see cref="T:System.Object"/>.
		/// </returns>
		public override string ToString()
		{
			return Message;
		}
	}
}